package org.irri.smta.ui.bean;

import java.io.Serializable;

import javax.annotation.PostConstruct;
import javax.faces.bean.SessionScoped;
import javax.inject.Inject;
import javax.inject.Named;

@Named("themeSwitcherBean")
@SessionScoped
public class ThemeSwitcherBean implements Serializable {

	private static final long serialVersionUID = 1L;

	@Inject
	@Named("uiConfigBean")
	private UIConfigBean uiConfigBean;
	
	private String theme;

	public String getTheme() {
		return theme;
	}

	public void setTheme(String theme) {
		this.theme = theme;
	}

	@PostConstruct
	public void init() {
		theme = uiConfigBean.getDefaultTheme();
	}
	
	public void setDefaultTheme() {
		theme = uiConfigBean.getDefaultTheme();
	}
	
	public void setAdministratorTheme() {
		theme = uiConfigBean.getAdministratorTheme();
	}
	
	public void setDataEntryTheme() {
		theme = uiConfigBean.getDataEntryTheme();
	}
	
	public void setUserTheme() {
		theme = uiConfigBean.getUserTheme();
	}

}
